package com.example.houseitemmanagebackend.service.impl;

import com.example.houseitemmanagebackend.service.StatusService;
import com.example.houseitemmanagebackend.vo.StatusVO;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * 状态服务实现类
 */
@Service
public class StatusServiceImpl implements StatusService {

    @Override
    @Cacheable(value = "statusList")
    public List<StatusVO> getStatusList() {
        List<StatusVO> statusList = new ArrayList<>();

        // 添加预定义的状态
        statusList.add(new StatusVO("active", "正常使用"));
        statusList.add(new StatusVO("inactive", "闲置"));
        statusList.add(new StatusVO("damaged", "损坏"));
        statusList.add(new StatusVO("loaned", "借出"));
        statusList.add(new StatusVO("disposed", "已处理"));

        return statusList;
    }
}